package org.jeecg.modules.order.entity;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.persistence.Transient;

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date:   2019-10-06
 * @Version: V1.0
 */
@Data
@TableName("t_order")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="t_order对象", description="订单")
public class Order {
    
	/**主键id*/
	@TableId(type = IdType.UUID)
    @ApiModelProperty(value = "主键id")
	private java.lang.String id;
	/**商户id*/
	@Excel(name = "商户id", width = 15)
    @ApiModelProperty(value = "商户id")
	@Dict(dicText = "name", dicCode = "id", dictTable = "merchant")
	private java.lang.String merchantId;
	/**popIp*/
	@Excel(name = "popIp", width = 15)
    @ApiModelProperty(value = "popIp")
	private java.lang.String deviceIp;
	/**pop编号*/
	@Excel(name = "pop编号", width = 15)
    @ApiModelProperty(value = "pop编号")
	private java.lang.String deviceNo;
	/**设备id*/
	@Excel(name = "设备id", width = 15)
    @ApiModelProperty(value = "设备id")
	@Dict(dicText = "code", dicCode = "id", dictTable = "equipment")
	private java.lang.String equipmentId;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
    @ApiModelProperty(value = "订单编号")
	private java.lang.String orderNo;
	/**商品名称*/
	@Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
	private java.lang.String goodsDesc;
	/**订单金额*/
	@Excel(name = "订单金额", width = 15)
    @ApiModelProperty(value = "订单金额")
	private java.lang.Long amount;

	@Transient
	private java.lang.String amountStr;
	/**订单类型 -1 未知*/
	@Excel(name = "订单类型 -1 未知", width = 15)
    @ApiModelProperty(value = "订单类型 -1 未知")
	@Dict(dicCode = "order_type")
	private java.lang.Integer type;
	/**状态 0 等待创建交易，1 待支付  2已支付 3 取消 4超时 9创建交易失败*/
	@Excel(name = "状态 0 等待创建交易，1 待支付  2已支付 3 取消 4超时 9创建交易失败", width = 15)
    @ApiModelProperty(value = "状态  0 等待创建交易，1 待支付  2已支付 3 取消 4超时 9创建交易失败")
	@Dict(dicCode = "order_status")
	private java.lang.Integer status;
	/**支付时间*/
	@Excel(name = "支付时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间")
	private java.util.Date payDate;
	/**pos机交易流水号*/
	@Excel(name = "pos机交易流水号", width = 15)
    @ApiModelProperty(value = "pos机交易流水号")
	private java.lang.String posTradeNo;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
    @ApiModelProperty(value = "创建人")
	private java.lang.String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;
	/**更新人*/
	@Excel(name = "更新人", width = 15)
    @ApiModelProperty(value = "更新人")
	private java.lang.String updateBy;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;
}
